package com.binary.coder.gift.core.interfaces.bill.assembler;

import cn.hutool.core.bean.BeanUtil;
import com.binary.coder.gift.core.domain.bill.model.entity.AccountBookEntity;
import com.binary.coder.gift.core.domain.bill.model.entity.AccountRecordEntity;
import com.binary.coder.gift.core.interfaces.bill.dto.req.SaveAccountBookReq;
import com.binary.coder.gift.core.interfaces.bill.dto.req.SaveAccountRecordReq;

/**
 * @author atao
 * @version 1.0.0
 * @ClassName AccountAssembler.java
 * @Description 账单装配
 * @createTime 2024年06月25日 09:09:00
 */
public class AccountAssembler {

    /**
     * 获取AccountRecordEntity
     * @param req
     * @return
     */
    public static AccountRecordEntity getAccountRecordEntity(SaveAccountRecordReq req) {
        return BeanUtil.copyProperties(req,AccountRecordEntity.class);
    }

    public static AccountBookEntity getAccountBookEntity(SaveAccountBookReq req) {
        return BeanUtil.copyProperties(req,AccountBookEntity.class);
    }

}
